package com.base.components.common.dto.sys;

import com.base.components.common.dto.mail.Mailable;

/**
 * DiscoveryAlarm
 *
 * @author <a href="drakelee1221@gmail.com">LiGeng</a>
 * @version v1.0.0
 * @date 2019-03-20 14:25
 */
public class DiscoveryAlarm {
  /** 单个服务ID异常后报警间隔（默认120秒） */
  private int intervals = 120;

  /** 通知邮箱 */
  private NotifyMailbox notifyMailbox;

  public int getIntervals() {
    return intervals;
  }

  public void setIntervals(int intervals) {
    this.intervals = intervals;
  }

  public NotifyMailbox getNotifyMailbox() {
    return notifyMailbox;
  }

  public void setNotifyMailbox(NotifyMailbox notifyMailbox) {
    this.notifyMailbox = notifyMailbox;
  }

  public static class NotifyMailbox implements Mailable{

    /** 发送者邮箱 smtp */
    private String smtp;

    /** 发送者邮箱地址 */
    private String address;

    /** 发送者邮箱密码 */
    private String password;

    /** 发到的目标邮箱，逗号分隔 */
    private String targetAddresses;

    @Override
    public String getSmtp() {
      return smtp;
    }

    public void setSmtp(String smtp) {
      this.smtp = smtp;
    }

    @Override
    public String getAddress() {
      return address;
    }

    public void setAddress(String address) {
      this.address = address;
    }

    @Override
    public String getPassword() {
      return password;
    }

    public void setPassword(String password) {
      this.password = password;
    }

    public String getTargetAddresses() {
      return targetAddresses;
    }

    public void setTargetAddresses(String targetAddresses) {
      this.targetAddresses = targetAddresses;
    }
  }
}
